[mirrors]
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz
[main]
filesize=3707781
sha512=230f6c5a73f4bea364f8aa3d75f76694305571dea45f357def742b2b50849b2d896af71e08689981207edc99a9836088bee2d0bd98d92c7f4ca52b12b3d8cf96

[deps]
sdl
alsa-lib
libvorbis
libmikmod
libflac
fluidsynth

[build]
# you may want to remove fluidsynth from the deps list, this will lead to a lack of midi
# but save from glib dependency hell.

printf "%s\n%s\n" 'extern void Mix_QuitFluidSynth();' 'extern int Mix_InitFluidSynth();' > patch.h
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
cat << EOF > libmikmod-config
#!/bin/sh
echo -lmikmod
EOF
chmod +x libmikmod-config
export PATH="$PWD:$PATH"
CFLAGS="$optcflags " \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
CPPFLAGS="-D_GNU_SOURCE -include patch.h" \
  ./configure -C --prefix="$butch_prefix" $xconfflags || exit 1
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS || exit 1
make DESTDIR="$butch_install_dir" install || exit 1
